OCRXpress for Node.js can recognize text in over 30 different languages. It is very simple to specify which language to use in the recognition process.
The default language is English and it is included with the default installation.
These are the four steps involved:
- Accusoft ocr distributes language packages for each supported language individually, as well as a package containing language data for all supported languages. There are two options, you can either:
- Install the entire language set with the ocr-lang-all:
|
Copy Code |
$ npm install ocr-lang-all |
- Install a single specific language (Italian, for instance):
|
Copy Code |
$ npm install ocr-lang-ita |
- Set the language in the recognizeParams structure.
|
Copy Code |
recognizeParams = {
language: 'Italian'
} |
- Include the installed language project in your javascript:
|
Copy Code |
var lang = require('ocr-lang-all'); |
or
|
Copy Code |
var lang = require('ocr-lang-ita'); |
- Call the recognize() function to perform recognition in the desired language.